package com.mszlu.blog.utils;

import com.mszlu.blog.dao.pojo.SysUser;


public class UserThreadLocal {
    private static final ThreadLocal<SysUser> LOCAL = new ThreadLocal<>();


    //线层变量隔离
    private UserThreadLocal(){}

    public  static void put(SysUser sysUser){
        LOCAL.set(sysUser);
    }

    public static SysUser get(){
        return LOCAL.get();

    }
    public static void remove(){
        LOCAL.remove();
    }
}
